const YAML = require('yamljs')
const fs = require('fs')
const { ClientServer } = require('../index')
let client_config = YAML.parse(
  fs.readFileSync('./config/client_config.yaml').toString()
)

const client = new ClientServer({
  // host: 'wall02.leixiaohua.icu',
  // host: '106.55.105.61',
  // host: '172.16.1.245',
  // host: '106.55.105.61',
  url: client_config.url,
  unid: client_config.unid
  // binds: server_config.binds,
})

client.init()
// console.log('哈哈哈');

setTimeout(function () {
  client.removeBinds(['www'])
  // client.addBinds({hello: {
  //   local_port: 21,
  //   remote_port: 10005}});
}, 5000)

module.exports = client
